package com.wetao.lib_common.greendao.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Unique;

/**
 * Created by xiaoyehai on 2018/8/9 0009.
 */
@Entity //@Entity 将我们的java普通类变为一个能够被greenDAO识别的数据库类型的实体类
public class FlexiImg {
    //@Id：主键，通过这个注解标记的字段必须是Long类型的，这个字段在数据库中表示它就是主键，并且它默认就是自增的
    @Id(autoincrement = true)
    private Long id;

    //@Unique  //唯一
    @NotNull    // @NotNull 设置数据库表当前列不能为空
    @Unique
    private String url;

    //@Unique  //唯一
    @NotNull    // @NotNull 设置数据库表当前列不能为空
    private String imgBase64;

    @Generated(hash = 288460041)
    public FlexiImg(Long id, @NotNull String url, @NotNull String imgBase64) {
        this.id = id;
        this.url = url;
        this.imgBase64 = imgBase64;
    }

    @Generated(hash = 1077364550)
    public FlexiImg() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImgBase64() {
        return this.imgBase64;
    }

    public void setImgBase64(String imgBase64) {
        this.imgBase64 = imgBase64;
    }



}
